<?php
require_once("../includes/config.inc.php");
validate_admin();
if($_POST)
{
	@extract($_POST);
	$sqlPE = " update tbl_admin set 
	userName = '$userName',
	password = '$password',
	email	 = '$email'
	where adminId = '$_SESSION[sess_admin_id]' 
	";
	executeQuery($sqlPE);

	$_SESSION['sessMsg'] = " Admin Detail Edited Successfully. ";
	header("location: ae_admin.php");
	exit();
}

	$sqlPD = " select * from tbl_admin where adminId = '$_SESSION[sess_admin_id]' ";
	$resPD = executeQuery($sqlPD);
	if($rowPD = mysql_fetch_array($resPD))
	{
		@extract($rowPD);
	}
?>